package cn.sinothk.map.amap.demo

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import kotlinx.android.synthetic.main.map_demo_activity_main.*

class MapDemoMainActivity : AppCompatActivity(), View.OnClickListener {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.map_demo_activity_main)

        locationBtn.setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        when (v) {
            locationBtn -> {
                startActivity(
                    Intent(
                        this@MapDemoMainActivity,
                        LocationDemoMainActivity::class.java
                    )
                )
            }
        }
    }
}